| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | const targets = Array.from(document.body.querySelectorAll('input[data-mapsfield=mapsfield]')); |
||
| 8 | const fillAddress = () => { |
||
| 9 | const location = autoComplete.getPlace(); |
||
| 10 | const components = location.address_components; |
||
| 11 | |||
| 12 | latField.setAttribute('value', location.geometry.location.lat()); |
||
| 13 | lngField.setAttribute('value', location.geometry.location.lng()); |
||
| 14 | |||
| 15 | components.forEach((component) => { |
||
| 16 | component.types.forEach((type) => { |
||
| 17 | const field = document.getElementById(type); |
||
| 18 | if (field) { |
||
| 19 | field.setAttribute('value', component.long_name); |
||
| 20 | } |
||
| 21 | }); |
||
| 22 | }); |
||
| 23 | }; |
||
| 24 | |||
| 33 | } |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.